import request from "@/utils/request";
export const getDepartment = () => {
  return request({
    url: "/company/department",
  });
};
// 获取-部门负责人列表
export const getManagerList = () => {
  return request({
    url: "/sys/user/simple",
  });
};
// 新增-部门
export const addDepartment = (data) => {
  return request({
    url: "/company/department",
    method: "post",
    data,
  });
};
// 获取-部门详情
export const getDepartmentDetail = (id) => {
  return request({
    url: `/company/department/${id}`,
  });
};
// 修改-部门详情
export const updateDepartment = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: "PUT",
    data,
  });
};
// 删除-部门
export const delDepartment = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: "DELETE",
  });
};
